\(\int \frac {1}{\sqrt {2-b x} \sqrt {2+b x}} \, dx\) [1537]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 11 \[ \int \frac {1}{\sqrt {2-b x} \sqrt {2+b x}} \, dx=\frac {\arcsin \left (\frac {b x}{2}\right )}{b} \]

[Out]

arcsin(1/2*b*x)/b

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {41, 222} \[ \int \frac {1}{\sqrt {2-b x} \sqrt {2+b x}} \, dx=\frac {\arcsin \left (\frac {b x}{2}\right )}{b} \]

[In]

Int[1/(Sqrt[2 - b*x]*Sqrt[2 + b*x]),x]

[Out]

ArcSin[(b*x)/2]/b

Rule 41

Int[((a_) + (b_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[(a*c + b*d*x^2)^m, x] /; FreeQ[{a, b
, c, d, m}, x] && EqQ[b*c + a*d, 0] && (IntegerQ[m] || (GtQ[a, 0] && GtQ[c, 0]))

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{\sqrt {4-b^2 x^2}} \, dx \\ & = \frac {\sin ^{-1}\left (\frac {b x}{2}\right )}{b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(27\) vs. \(2(11)=22\).

Time = 0.03 (sec) , antiderivative size = 27, normalized size of antiderivative = 2.45 \[ \int \frac {1}{\sqrt {2-b x} \sqrt {2+b x}} \, dx=\frac {2 \arctan \left (\frac {b x}{-2+\sqrt {4-b^2 x^2}}\right )}{b} \]

[In]

Integrate[1/(Sqrt[2 - b*x]*Sqrt[2 + b*x]),x]

[Out]

(2*ArcTan[(b*x)/(-2 + Sqrt[4 - b^2*x^2])])/b

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(55\) vs. \(2(9)=18\).

Time = 0.53 (sec) , antiderivative size = 56, normalized size of antiderivative = 5.09

method result size
default \(\frac {\sqrt {\left (-b x +2\right ) \left (b x +2\right )}\, \arctan \left (\frac {\sqrt {b^{2}}\, x}{\sqrt {-b^{2} x^{2}+4}}\right )}{\sqrt {-b x +2}\, \sqrt {b x +2}\, \sqrt {b^{2}}}\) \(56\)

[In]

int(1/(-b*x+2)^(1/2)/(b*x+2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

((-b*x+2)*(b*x+2))^(1/2)/(-b*x+2)^(1/2)/(b*x+2)^(1/2)/(b^2)^(1/2)*arctan((b^2)^(1/2)*x/(-b^2*x^2+4)^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 31 vs. \(2 (9) = 18\).

Time = 0.24 (sec) , antiderivative size = 31, normalized size of antiderivative = 2.82 \[ \int \frac {1}{\sqrt {2-b x} \sqrt {2+b x}} \, dx=-\frac {2 \, \arctan \left (\frac {\sqrt {b x + 2} \sqrt {-b x + 2} - 2}{b x}\right )}{b} \]

[In]

integrate(1/(-b*x+2)^(1/2)/(b*x+2)^(1/2),x, algorithm="fricas")

[Out]

-2*arctan((sqrt(b*x + 2)*sqrt(-b*x + 2) - 2)/(b*x))/b

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 13.14 (sec) , antiderivative size = 76, normalized size of antiderivative = 6.91 \[ \int \frac {1}{\sqrt {2-b x} \sqrt {2+b x}} \, dx=- \frac {i {G_{6, 6}^{6, 2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} & \frac {1}{2}, \frac {1}{2}, 1, 1 \\0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 0 & \end {matrix} \middle | {\frac {4}{b^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} b} + \frac {{G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 1 & \\- \frac {1}{4}, \frac {1}{4} & - \frac {1}{2}, 0, 0, 0 \end {matrix} \middle | {\frac {4 e^{- 2 i \pi }}{b^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} b} \]

[In]

integrate(1/(-b*x+2)**(1/2)/(b*x+2)**(1/2),x)

[Out]

-I*meijerg(((1/4, 3/4), (1/2, 1/2, 1, 1)), ((0, 1/4, 1/2, 3/4, 1, 0), ()), 4/(b**2*x**2))/(4*pi**(3/2)*b) + me
ijerg(((-1/2, -1/4, 0, 1/4, 1/2, 1), ()), ((-1/4, 1/4), (-1/2, 0, 0, 0)), 4*exp_polar(-2*I*pi)/(b**2*x**2))/(4
*pi**(3/2)*b)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.82 \[ \int \frac {1}{\sqrt {2-b x} \sqrt {2+b x}} \, dx=\frac {\arcsin \left (\frac {1}{2} \, b x\right )}{b} \]

[In]

integrate(1/(-b*x+2)^(1/2)/(b*x+2)^(1/2),x, algorithm="maxima")

[Out]

arcsin(1/2*b*x)/b

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.36 \[ \int \frac {1}{\sqrt {2-b x} \sqrt {2+b x}} \, dx=\frac {2 \, \arcsin \left (\frac {1}{2} \, \sqrt {b x + 2}\right )}{b} \]

[In]

integrate(1/(-b*x+2)^(1/2)/(b*x+2)^(1/2),x, algorithm="giac")

[Out]

2*arcsin(1/2*sqrt(b*x + 2))/b

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 44, normalized size of antiderivative = 4.00 \[ \int \frac {1}{\sqrt {2-b x} \sqrt {2+b x}} \, dx=-\frac {4\,\mathrm {atan}\left (\frac {b\,\left (\sqrt {2}-\sqrt {2-b\,x}\right )}{\left (\sqrt {2}-\sqrt {b\,x+2}\right )\,\sqrt {b^2}}\right )}{\sqrt {b^2}} \]

[In]

int(1/((2 - b*x)^(1/2)*(b*x + 2)^(1/2)),x)

[Out]

-(4*atan((b*(2^(1/2) - (2 - b*x)^(1/2)))/((2^(1/2) - (b*x + 2)^(1/2))*(b^2)^(1/2))))/(b^2)^(1/2)